package cn.wolfcode.wolf2w.respository;

import cn.wolfcode.wolf2w.domain.Destination;
import cn.wolfcode.wolf2w.domain.Travel;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 区域持久化操作接口
 */
@Repository
public interface TravelRepository extends MongoRepository<Travel, String> {


    /**
     * 查询前三的游记
     * @param destId
     * @param pageable
     * @return
     */
    List<Travel> findByDestId(String destId, Pageable pageable);

    /**
     *
     * @param id
     * @return
     */
    List<Travel> queryByDestId(String id);
}
